package com.zr.service.impl;

import com.zr.dao.HangyeDao;
import com.zr.dao.impl.HangyeDaoImpl;
import com.zr.model.Content;
import com.zr.service.HangyeService;

public class HangyeServiceImpl implements HangyeService{

	HangyeDao hd = new HangyeDaoImpl();
	
	@Override
	public int getTotalSourse() {
		
		return hd.getTotalSourse();
	}

	@Override
	public Content getContentSourse(int total) {
		
		int flag = hd.getTotalSourse();
		
		if (flag > total) {
			Content content = hd.getContentSourse(total);
			return content;
		}else {
			return null;
		}
		
	}

}
